# !/usr/bin/env python3
# -*- coding: utf-8 -*-
# aim:    检测字符串编码练习
# author: wangkaixuan
# email:  26554189525@qq.com 
# date:   2018/1/10
import chardet
print(chardet.detect(b'wangkaixuan'))

data = '王凯旋'.encode('gbk')
print(chardet.detect(data))